package com.etone.prodcons;


public class Productor implements Runnable{

	ProQueue<? extends Object> queue = null;
	
	public Productor(ProQueue<? extends Object> queue){
		this.queue = queue;
	}
	
	@Override
	public void run() {
		
		for(int i = 0; i<20; i++){
			String value =Thread.currentThread().getName() +  " : " + i + "th product";
			
			queue.put(value);
			System.out.println("---> Putted the " + Thread.currentThread().getName() +" ("+ i + ")th product!" );
			System.out.println();
			System.out.println();
			try {
				Thread.sleep(5);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}

}
